package com.scaupos.mis11c.Controller;

import com.scaupos.mis11c.Entities.SystemUsers;
import com.scaupos.mis11c.Repository.SystemUsersRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserTest {
    @Autowired
    SystemUsersRepository systemUsersRepository;

    @RequestMapping("/f")
    public SystemUsers findByUsername(@RequestParam(value="username",required=false)String username){
        return systemUsersRepository.findByUsername(username);
    }
}
